//api文件仍保留但不建议使用，推荐使用models中的api。API files remain preserved (deprecated), use models APIs instead.
import type { WechatMenus, WechatMenusResponse } from './types.js';

import { requestClient } from '#/api/request';

export const getuctooWechatMenusList = async (page: number, pageSize: number,
  searchParams?: any) => {
  return requestClient.get<WechatMenusResponse>(`/uctoo/wechat_menus/${pageSize}/${page}`,{
    params: searchParams,
  });
};

export const getuctooWechatMenus = async (id: string) => {
  return requestClient.get<WechatMenus>(`/uctoo/wechat_menus/${id}`);
};

export const adductooWechatMenus = async (data: Partial<WechatMenus>) => {
  return requestClient.post<WechatMenus>('/uctoo/wechat_menus/add', data);
};

export const edituctooWechatMenus = async (data: Partial<WechatMenus>) => {
  return requestClient.post<WechatMenus>('/uctoo/wechat_menus/edit', data);
};

export const deleteuctooWechatMenus = async (id: string) => {
  return requestClient.post<any>('/uctoo/wechat_menus/del', { id });
};
